<!doctype html>
<style>
  html {
  }
  body {
    margin: 0;
    font-size: 0; /* prevents text from influencing document size */
  }
  #warning {
    font-size: 20px;
    color: red;
    background-color: rgba(255,0,0,0.1);
  }
  .hide {
    display:none;
  }

</style>

<p id="warning" class="hide">ResizeObserver not detected. Demo will not work.</p>
<img src="http://lorempixel.com/200/150">

<script src="iframeResize.js"></script>
<script>
try {
  iframeResize.setupIframe(true);
} catch(ex) {
  document.querySelector("#warning").classList.remove("hide");
}
</script>
